<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>动态绑定外部样式——数组语法</title>
    <style>
        .bg {
            background-color: chocolate;
        }

        .line {
            text-decoration: underline;
        }
    </style>
</head>
<body>
<div id="app">
    <h1 v-bind:class="status? 'bg' : 'line' ">Hello, Vue!</h1>
</div>

<script type="module">
    import {createApp, ref} from "../../../js/vue.esm-browser.js";

    let app = createApp(
        {
            setup() {
                let status = ref(true)

                return {
                    status
                }
            }
        }
    );

    app.mount("#app")
</script>
</body>
</html>